<template>
  <Dialog :visible.sync="dialog.visible" :title="dialog.title" :width="dialog.width" @onClose='onClose'
    @onConfirm='confirm' :height="dialog.height">
    <template v-slot:content>
      <el-tree ref="assignTree" :data="assignTreeData.list" node-key="id" :props="defaultProps" empty-text="暂无数据"
        :show-checkbox="true" default-expand-all :highlight-current="true"
        :default-checked-keys='assignTreeData.assignTreeChecked'></el-tree>
    </template>
  </Dialog>
</template>

<script setup>
import { ref, reactive } from 'vue'
const emit = defineEmits(['save'])
import Dialog from '@/components/dialog/Dialog.vue';
import { useDialog } from '@/hooks/useDialog'
import { useRoleAssignMenu } from '@/composables/role/useRoleAssignMenu';
import { useBaseModel } from '@/composables/role/useBaseModel'
const { addRoleModel, rules } = useBaseModel()
const { dialog, onClose, onShow } = useDialog()
const { confirm, show, assignTreeData, assignTree, defaultProps } = useRoleAssignMenu(dialog, onClose, onShow, emit)
//暴露方法给外部使用
defineExpose({
  show
})
const formSize = ref('default')

</script>

<style lang="scss" scoped></style>